@mixin button-size($height, $padding, $font-size, $border-radius) {
  height: $height;
  // line-height: $height;
  padding: $padding;
  font-size: $font-size;
  // border-radius: $border-radius;
}


@mixin btn {
  position: relative;
  display: inline-block;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  background-image: none;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  outline: none;
  min-width: 70px;
  margin-right: 10px;

  @include button-size($btn-height-base, $btn-padding-base, $btn-font-size-base, $btn-border-radius-base);

}


@mixin btn-default() {
  @include button-variant($btn-default-color, $btn-default-bg, $btn-default-border, $btn-default-hover-bg, $btn-default-hover-color, $btn-default-hover-border, $btn-default-disabled-bg, $btn-default-disabled-color, $btn-default-disabled-border);
}

@mixin btn-warning() {
  @include button-variant($btn-default-color, $btn-default-bg, $btn-default-border, $btn-default-hover-bg, $btn-default-hover-color, $btn-default-hover-border, $btn-default-disabled-bg, $btn-default-disabled-color, $btn-default-disabled-border);
}

// 几种颜色共用的
@mixin button-variant($color, $background, $border, $hover_bg, $hover_color, $hover_border, $disabled_bg, $disabled_color, $disabled_border) {

  @include button-color($color, $background, $border);

  &:hover:not(.disabled),
  &.active:not(.disabled) {
    @include button-color($hover_color, $hover_bg, $hover_border);
    text-decoration: none;
    background-image: linear-gradient(to right, #2D8BC0, #53AFE4);
    border:none;
    box-sizing: border-box;
  }


  &:active:not(.disabled) {
    @include button-color($btn-default-down-color, $btn-default-down-bg, $btn-default-down-border);
    background-color: #fff!important;
  }

  &.disabled {
    cursor: not-allowed;
    @include button-color($btn-default-disabled-color, $btn-default-disabled-bg, $btn-default-disabled-border);
  }

}

@mixin button-color($color, $background, $border) {
  color: $color;
  background-color: $background;
  border-color: $border;
}